package com.bcbim.model_server.floor.service;

import com.bcbim.model_server.floor.mapper.FloorMapper;
import com.bcbim.model_server_interface.component.vo.MaterialIndexVO;
import com.bcbim.model_server_interface.floor.service.FloorService;
import com.bcbim.model_server_interface.floor.vo.FloorVO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description: 楼层接口
 * @Author: ye
 * @Date: 2022/4/15
 * @Version: V1.0
 **/
@Service(timeout = 60 * 1000, group = "floor", version = "1.0.0")
public class FloorServiceImpl implements FloorService {
    @Autowired
    private FloorMapper floorMapper;

    /**
     * @Description: 楼层查询
     * @Param: fileId
     * @Return: List<FloorVO>
     * @Author: ye
     * @Date: 2022/4/15
     */
    @Override
    public List<FloorVO> listFloor(String fileId) {
        return floorMapper.listFloor(fileId);
    }

    /**
     * @Description: 查询楼层的相关模型
     * @Param: floorId
     * @Return: List<MaterialIndexVO>
     * @Author: ye
     * @Date: 2022/4/18
     */
    @Override
    public List<MaterialIndexVO> getFloorModel(String floorId) {
        return floorMapper.getFloorModel(floorId);
    }

    /**
     * @Description: 查询楼层的文件id
     * @Param: floorId
     * @Return: String
     * @Author: ye
     * @Date: 2022/4/18
     */
    @Override
    public String getFileId(String floorId) {
        return floorMapper.getFileId(floorId);
    }
}
